/*
 * Rule.java
 *
 * Created on June 23, 2006, 8:13 PM
 *
 */

package galronnlp.cfg.grammar;

import java.util.List;

import galronnlp.util.Symbol;

/**
 * Interface for non-probabilistic context free grammar rules
 *
 * @author Daniel A. Galron
 */
public interface Rule {
    /**
     * The number of LHS elements (branches) this rule has. For instance, in a
     * rule X => Y Z, the arity is 2.
     *
     * @return the number LHS elements. 
     */
    public int arity();
    
    /**
     * Get the Left Hand Side of the rule
     */
    public Symbol LHS();
    
    /**
     * Get the Right Hand Side of the rule
     *
     * @return a list with the LHS elements
     */
    public List<Symbol> RHS();

    /**
     * Get the String representation of this rule
     */
    public String toString();
    
    public boolean hasTerminalRHS();
    
    
}
